home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / CITM24.ARJ / CITM.DOC next >
Text File  |  1991-03-27  |  6KB  |  145 lines

  1.                                CITM 2.4
  2.  
  3.                             Counts similar
  4.                          items in sorted lists
  5.  
  6.                                   by
  7.                                Bob Eyer
  8.                              Mar 27, 1991
  9.  
  10.  
  11.      Files in CITM24.ZIP:
  12.      -------------------
  13.      CITM.EXE
  14.      CITM.DOC
  15.      RUN.BAT
  16.      COM.DIR
  17.      EXE.DIR
  18.  
  19.      If  your  archive  does  not  contain  each of these files, please
  20.      inform me (see end of documentation below).  Thanks.
  21.  
  22.      Use  the  RUN.BAT file to run the demo, to see how CITM works on a
  23.      couple of examples.
  24.  
  25.      Syntax:
  26.      ------
  27.      CITM Filespec Startpos Width [>Logfile]
  28.  
  29.  
  30.  
  31.      Definitions:
  32.      -----------
  33.      Filespec: The  name of the file containing the similar items to be
  34.                counted, or a wildcard  filespec  defining  a  range  of
  35.                filenames.    CITM   now   has  full  wildcard  support,
  36.                including support for all standard DOS shortcuts.
  37.  
  38.      Startpos: The column number  beginning  the  field  containing
  39.                similar items which are to be counted. The maximum value
  40.                of Startpos is the maximum line length minus Width.
  41.  
  42.      Width:    The number of characters in that field.  The maximum
  43.                which CITM will accept is 18.
  44.  
  45.      Logfile:  The resulting list of counts by name of similar item.
  46.                If  not  mentioned,  CITM  returns  its  output  to  the
  47.                screen.  The new screen default is especially useful  in
  48.                cases  where  the  number  of groups of similar items is
  49.                likely to be small.
  50.  
  51.      Purpose:
  52.      -------
  53.      To count similar items in sorted lists.  The test for identity  of
  54.      item  is  based  on  the  substring  from  the input file which is
  55.      determined by the Start Position and the Width of that string.
  56.  
  57.      This should also be one of the sort fields used when  sorting  the
  58.      list in preparation for the count.
  59.  
  60.      The value of a program like CITM  should  be  evident  chiefly  to
  61.      users   who  routinely  prepare  line-sorted  lists  of  formatted
  62.      information,   such   as   BBS   Sysops,    financial    managers,
  63.      statisticians, and so on.
  64.  
  65.  
  66.      Example:
  67.      -------
  68.      Suppose we wish to determine how many files have been listed by  a
  69.      BBS  in  each month of its operation.  Most BBS's carry a complete
  70.      list of files in which there occur a principal line for each  file
  71.      containing a date in some sort of standard form.  We download that
  72.      file  and  then  proceed to sort on the field containing the month
  73.      statistic.  Usually this will be column 24, and the width  of  the
  74.      field should be 2.  However, most BBS's have listings that go back
  75.      some  number of years.  Therefore, it is necessary to use the year
  76.      of each listing as the primary sort field.  This statistic usually
  77.      starts at column 30 with width 2.  If we  choose  to  use  Baker's
  78.      QSORT, the command might go like this:
  79.  
  80.      QSORT BBSLIST /+30:2 /+24:2
  81.  
  82.      This  will  have  the effect of making sure that all similar month
  83.      items of each year are consecutively listed.
  84.  
  85.      After  this  is  done,  we  may  then  proceed  to execute CITM as
  86.      follows:
  87.  
  88.      CITM BBSLIST 24 2
  89.  
  90.      Notice that the column position and width correspond exactly  with
  91.      the  sort parameters appropriate to the count listing.  The column
  92.      and width values given on the CITM command line  define  the  test
  93.      for similarity.
  94.  
  95.      To obtain a file listing the information, simply use DOS redirect:
  96.  
  97.      CITM BBSLIST 24 2 >BBSCOUNT
  98.  
  99.      Polishing the Count List
  100.      ------------------------
  101.      The count list (BBSCOUNT in the example above) will contain a list
  102.      of counts for each similar string.  This list will  always  appear
  103.      in  the  order  in  which similar strings occur in the input file.
  104.      But the user may wish to sort the count file, as well - say,  from
  105.      highest to lowest count.  Because CITM's output is formatted, such
  106.      a 'polishing' sort can be done without difficulty.
  107.  
  108.      Effect of the use of wildcards
  109.      ------------------------------
  110.      This new version of  CITM  supports  wildcard  Filespecs,  and  so
  111.      allows  the  user  to  obtain count summaries on whole directories
  112.      containing sorted lists.  For this purpose,  CITM  always  records
  113.      the  name  of  the  file read into memory at the top of each count
  114.      list, for identification purposes.
  115.  
  116.      To  see  how wildcards affect output, simply execute the RUN batch
  117.      file in the present archive.
  118.  
  119.      CITM's use of wildcards also  covers  all  standard  DOS  wildcard
  120.      shortcuts.   So,  if you have many text files of the same type and
  121.      format in one directory called TEST, and you are in TEST's parent,
  122.      you may obtain all the count  reports  for  each  file  simply  by
  123.      entering a command like:
  124.  
  125.      CITM TEST Startpos Width
  126.  
  127.      This  will  generate  as many formatted count reports as there are
  128.      properly formatted files in the TEST subdirectory.
  129.  
  130.      DISCLAIMER:
  131.      ==========
  132.      This  program  is  circulated as freeware without any guarantee or
  133.      warranty; and the  user,  by  downloading  this  program,  or  any
  134.      variant  thereof  or by receiving it or any of its versions in any
  135.      other form, agrees to accept full responsibility for its use.   It
  136.      is  therefore understood that the user accepts this program or any
  137.      previous version as is.
  138.  
  139.      Bob Eyer                  The author may also be reached at
  140.      Compuserve [73230,2620]   ROSE MEDIA 416-733-2285 (Main Conf)
  141.      Toronto                   or
  142.      Canada                    CANADA REMOTE 416-629-7044 (IBM Conf)
  143.      -------------------------------------------------------------
  144.      End of documentation.
  145.